﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentNHibernate.Mapping;
using SimpleScrum.Core.Entities;

namespace SimpleScrum.Core.Mappings
{
    public class TimeLineMap : ClassMap<TimeLine>
    {
        public TimeLineMap()
        {
            Table("TimeLine");
            LazyLoad();
            Id(x => x.Id).Column("ID").GeneratedBy.GuidComb();
            Map(x => x.Time).Column("Time").Not.Nullable();
            Map(x => x.Status).Column("Status").Not.Nullable();
            References(x => x.Users).Column("UsersId").Cascade.All();
            References(x => x.Project).Column("ProjectId").Cascade.All();
        }
    }
}
